10. Internet Service Commands > 10.7 AT^SISR   Internet Service Read Data > 10.7.1 Example: Socket Host Reads Small Amounts of UDP Data Pack­ets (URC Mode)

10.7.1
This section applies only to the Socket service using the UDP protocol. The example shows how to read UDP packets if the buffer of the host application can handle only a few bytes. There are two datagrams available for reading.
Buffer size: 6 bytes
Datagram A = 18 bytes (content "THIS_IS_DATAGRAM_A")
Datagram B = 3 bytes (content "NEW")
 
Service profile 0 is configured for Socket service and UDP. The URC notifies host that data is available for reading.
Again, the host requests to read 6 bytes. This time, the request refers to datagram B which has only 3 bytes. As the read datagram is smaller than the size requested by the host, the response does not include the <remainUdpPacketLength>.